function TaskItem(props) {

    const {item,index,deleteTask} = props
    const {task,date} = item
    
    // const handleDelete=function(){ //00ff33
    //     deleteTask(index)
    // }
    const handleDelete=()=>{ //00ff33
        deleteTask(index)
    }
    return (
        <li >
            <span>{index+1}-{task}--{date}</span>{' '}
            <button onClick={handleDelete}>delete</button>
        </li>
    )
  }

 export default TaskItem